/*
 * @Author: your name
 * @Date: 2022-03-03 14:32:48
 * @LastEditTime: 2022-03-03 14:37:05
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \day05\10-callee属性.js
 */
//6de 阶乘  可以使用callee实现阶乘的递归
function sum(n){
    if(n==1){
        return 1
    }else{
        return n+arguments.callee(n-1)  //n+sum(5)
        
    }
}
var result=sum(6);
console.log(result);